<?php
use yii\helpers\Html;
use yii\grid\GridView;
use yii\web\View;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '用户中心-锐锋堂刀剑网';
$this->params['breadcrumbs'][] = $this->title;
$this->registerJsFile('/js/jquery.SuperSlide.2.1.1.js');
$this->registerCssFile('/css/common.css');
$this->registerCssFile('/css/user.css');
$page=count($collect)>=5?5:count($collect);
$this->registerJs('
    jQuery("#Record_p").slide({ mainCell:".bd ul",effect:"leftLoop",vis:1,autoPlay:false });jQuery("#Collect_Products").slide({ mainCell:".bd ul",effect:"leftLoop",vis:'.$page.',autoPlay:false });
    ');
?>

			<div class="info_content">
				
				<div class="user_info">
					<ul class="">
						<li class="Balance"><a href="/user/info.html"><img src="/images/user_img_05.png" />
							<h4>个人资料</h4></a></li>
						<li class="Order_form"><a href="/user/order.html"><img
								src="/images/user_img_04.png" />
							<h4>订单管理</h4></a></li>
						<li class="grade"><a href="/user/cart.html"><img src="/images/user_img_08.png" />
							<h4>购物车</h4></a></li>
						<li class="Favorable"><a href="/user/collect.html"><img
								src="/images/user_img_07.png" />
							<h4>我的收藏</h4></a></li>
						<li class="integral"><a href="/user/safe.html"><img
								src="/images/user_img_06.png" />
							<h4>安全中心</h4></a></li>
					</ul>
				</div>
				<!--样式-->
				<div class="user_info_p_s  clearfix">
					<!--订单记录-->
					<div class="left_user_cont">
						<div class="us_Orders left clearfix">
							<div class="Orders_name">
								<div class="title_name">
									<div class="Records">购买记录</div>
									<div class="right select">只记录你最近30天的购买记录</div>
								</div>
							</div>
							<div class="Order_form_list">
		<table>
			<thead>
				<tr>
					<td class="list_name_title0" style='width:160px'>商品</td>
					<td class="list_name_title1">单价(元)</td>
					<td class="list_name_title2">数量</td>
				</tr>
			</thead>
			<?php if(!empty($order)):?>
			<?php foreach($order as $val):?>
			<tbody>
				<tr class="Order_Details">
					<td colspan="3">
						<table class="Order_product_style">
							<tbody>
							<?php if(!empty($val['oinfo'])):?>
							<?php foreach($val['oinfo'] as $v):?>
								<tr>
									<td style='width:197px;'>
										<div class="product_name clearfix">
											<a href="#" class="product_img"><img src="<?=$v['logo']?>"
												width="80px" height="80px"></a> <a href="/goods/view-<?=$v['gid']?>.html" class="p_name"><?=mb_strimwidth($v['name'], 0,30,'...','utf-8')?></a>
											<p class="specification"><?=$v['num']?>/把</p>
										</div>
									</td>
									<td style='width:100px'><?=$v['price']?></td>
									<td style='width:100px;padding:0'><?=$v['num']?></td>
								</tr>
							<?php endforeach;?>
							<?php endif;?>
							</tbody>
						</table>
					</td>
				</tr>
			</tbody>
			<?php endforeach;?>
			<?php endif;?>
		</table>
	</div>
							<div class="us_jls">共2条记录</div>
						</div>
					</div>
					<!--右侧记录样式-->
					<div class="right_user_recording">
						<div class="us_Record">
							<div id="Record_p" class="Record_p">
								<div class="title_name">
									<span class="name left">浏览历史</span><span
										class="pageState right"><span>1</span>/7</span>
								</div>
								<div class="hd">
									<a class="next">&lt;</a><a class="prev">&gt;</a>
								</div>
								<div class="bd">
									<ul>
									<?php if(!empty($record)):?>
									<?php foreach($record as $val):?>
										<li class="clone">
											<div class="p_width">
												<div class="pic">
													<a href=""><img src="<?=$val['goods']['logo']?>"></a>
												</div>
												<div class="title">
													<a href="#"><?=$val['goods']['name']?></a>
												</div>
												<div class="Purchase_info">
													<span class="p_Price">￥<?=$val['goods']['price']?></span> <a href="/goods/view-<?=$val['goods']['id']?>.html"
														class="Purchase">立即购买</a>
												</div>
											</div>
										</li>
										<?php endforeach;?>
									<?php endif;?>	
									</ul>
								</div>
							</div>
						</div>
					</div>
				</div>
				<!--收藏商品-->
				<div class="Collections_p">
					<div class="title_name">
						收藏的商品 <a href="/user/collect.html" class="more">更多收藏</a>
					</div>
					<div id="Collect_Products" class="Collect_Products">
						<div class="hd">
							<a class="next">&lt;</a><a class="prev">&gt;</a>
						</div>
						<div class="bd">
							<ul>
								<?php if(!empty($collect)):?>
							<?php foreach($collect as $val):?>
								<li>
									<div class="pic">
										<a href=""><img src="<?=$val['goods']['logo']?>"></a>
									</div>
									<div class="title">
										<a href="#"><?=$val['goods']['name']?></a>
									</div>
									<div class="p_Price">￥<?=$val['goods']['price']?></div>
								</li>
								<?php endforeach;?>
							<?php endif;?>
							</ul>
						</div>
					</div>
					<script type="text/javascript"></script>
				</div>
				<!--结束-->
			</div>